package com.zrrd.blog.oauth2.config;


import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

@Configuration
public class PasswordEncoderConfig {

    //启动时在组件中添加密码处理的实例，在使用时，可以直接被注入对象
    @Bean
    public PasswordEncoder passwordEncoder(){
        System.out.println("123123123");
        return new BCryptPasswordEncoder();
    }
}
